package com.guchenbo.demo.jdbc.web;

import com.guchenbo.demo.jdbc.service.TestManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author guchenbo
 * @Date 2020/3/23.
 */
@RestController
@RequestMapping("/")
public class TestApi {

    @Autowired
    private TestManager testManager;
    @RequestMapping("t1")
    public String t1(@RequestParam(name = "s")String s){
        if ("1".equals(s)){
            testManager.m1();
        }else if ("2".equals(s)){
            testManager.m2();
        }else if ("3".equals(s)){
            testManager.m3();
        }
        return "ok";
    }
}
